package com.baiqian.doupo.item;

import com.baiqian.doupo.Utils;
import com.baiqian.doupo.modgroup.DouPoModGroup;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemModelsProperties;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;

import javax.annotation.Nullable;
import java.util.List;


//动态异火设计（未成功）
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
class PropertyRegistry {
    @SubscribeEvent
    public static void propertyOverrideRegistry(FMLClientSetupEvent event) {
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_1.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_2.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_3.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_4.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_5.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_6.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_7.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                return Math.abs(System.currentTimeMillis()/40%18);
            }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_8.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_9.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_10.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_11.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_12.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_13.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_14.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_15.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_16.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_17.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_18.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_19.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_20.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_21.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_22.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
        event.enqueueWork(() -> {
            ItemModelsProperties.registerProperty(ItemRegistry.yi_huo_23.get(), new ResourceLocation(Utils.MOD_ID, "time"),
                    (itemStack, clientWorld, livingEntity) -> {
                        return Math.abs(System.currentTimeMillis()/40%18);
                    }
            );
        });
    }
}

public class YiHuo {
}

//异火1:帝炎
class YiHuo_1 extends Item {
    public YiHuo_1() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_2 extends Item {
    public YiHuo_2() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_3 extends Item {
    public YiHuo_3() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_4 extends Item {
    public YiHuo_4() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_5 extends Item {
    public YiHuo_5() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_6 extends Item {
    public YiHuo_6() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_7 extends Item {
    public YiHuo_7() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_8 extends Item {
    public YiHuo_8() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_9 extends Item {
    public YiHuo_9() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_10 extends Item {
    public YiHuo_10() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_11 extends Item {
    public YiHuo_11() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_12 extends Item {
    public YiHuo_12() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_13 extends Item {
    public YiHuo_13() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_14 extends Item {
    public YiHuo_14() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_15 extends Item {
    public YiHuo_15() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_16 extends Item {
    public YiHuo_16() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_17 extends Item {
    public YiHuo_17() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_18 extends Item {
    public YiHuo_18() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_19 extends Item {
    public YiHuo_19() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_20 extends Item {
    public YiHuo_20() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_21 extends Item {
    public YiHuo_21() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_22 extends Item {
    public YiHuo_22() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}

//异火1:帝炎
class YiHuo_23 extends Item {
    public YiHuo_23() {
        super(new Properties().group(DouPoModGroup.douPoFireGroup).maxStackSize(1));
    }

    public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
        tooltip.add(this.getDescription().mergeStyle(TextFormatting.GRAY));
    }

    @OnlyIn(Dist.CLIENT)
    public IFormattableTextComponent getDescription() {
        return new TranslationTextComponent(this.getTranslationKey() + ".1");
    }
}